<server language="JavaScript">
// BEGININC
<!--#INCLUDE file="server.inc" -->
// ENDINC

function findContentCallback( prop, val, curDepth )
{
	var listName = prop.leftProp( -1 );

	var mountPoint = RMAGetPropertyValue( listName + ".MountPoint" );
	if ( ! mountPoint )	
		return ;

	// if ShortName is not "pn-local" or "pn-network" or
	// if the mountPoint resembles an adminFS or
	// there's a baseMountPoint then 
	// save in our map of non-content Mount Points
	if ( ((val != "pn-local") && (val != "pn-network")) ||
	     (-1 != mountPoint.search( /admin/i )) ||
		 (RMAGetPropertyValue( prop + ".BaseMountPoint" )) )
	{
		nonContentMountPoints[ listName.rightProp() ] = mountPoint;
		return ;
	}

	//its a keeper!
	contentListNames[ contentListNames.length ] = listName ;
}

// build list of qualifying content mount points

var contentListNames = new Array();
var nonContentMountPoints = new Array();

findSubProp( "config.FSMount", "ShortName", findContentCallback, 0 );

RMAOutput( "var mountPoints = new Array();\n" );

var listName, arrayName, desc ;
for ( var i = 0; i < contentListNames.length; i++ )
{
	listName = contentListNames[ i ];
	desc = 	listName.rightProp();
	arrayName = "mountPoints[" + qVar( desc ) + "]" ;

	emitPropsToJSArray( listName, arrayName, 0, 0 );

	// add the list name to the sub array as the "Description" property
	emitArrayProp( arrayName, "Description", desc );
}

// list of all other FSMount listnames for enforcing uniqueness
emitServArrayToClientArray( nonContentMountPoints, "FSMountListNames" );

</server>


